package d0327;

import java.util.ArrayList;
import java.util.Random;

public class Test1 {

        public static void main(String[] args) {
            ArrayList<Integer> list = new ArrayList<Integer>();
            Random random = new Random();
            int count = 0;
            while (count < 10) {
                int number = random.nextInt(10) + 1;
                if (!list.contains(number)) {
                    list.add(number);
                    count++;
                }
            }
            System.out.println(list);
        }
    }

